<template>
  <div id="DeskOrderOne">
    <!--    <h1>{{ParentId}}</h1>-->
    <h1>订单编号：{{order.orderId}}</h1>
    <div v-for="p of orderDetails" id="div3" style="text-align: left">
      <h3>商品名称：{{p.commodityName}}</h3>
      <h3>商品数量：{{p.count }}</h3>
      <h3>商品单价：{{p.price}}</h3>
      <h3>商品小计：{{p.subtotal}}</h3>
      <el-image
          style="width: 100px; height: 100px"
          :src="p.image"
      ></el-image>
      <h1>------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</h1>
    </div>
  </div>

</template>

<script>
export default {
  name: "DeskOrderOne",
  data: () => {
    return {
      // 订单
      order: {},
      //详情
      orderDetails: [],
    }
  },
  created() {
    // 从路由对象中取出参数
    this.order=this.$route.params.order

    //查询供应商单个订单下的详情
    this.$axios.post(`DeskOrder/One/${this.order.id}`).then((r =>{
      console.log("商户单个订单",r.data)
      this.orderDetails=r.data;
    }))
  }
}
</script>
<style scoped>

</style>